<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'cwo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <form action="cwo.jsp" method="post">
      <input type="text" name="score" value="${param.score }">
      <input type="submit">
    </form>
    
    <!-- choose, when, otherwise -->
    <c:choose>
        <c:when test="${param.score >= 90 && param.score <= 100 }">
            <c:out value="优秀"></c:out>
        </c:when>
        <c:when test="${param.score >= 80 && param.score < 90 }">
            <c:out value="良好"></c:out>
        </c:when>
        <c:when test="${param.score >= 70 && param.score < 80 }">
            <c:out value="中等"></c:out>
        </c:when>
        <c:when test="${param.score >= 60 && param.score < 70 }">
            <c:out value="及格"></c:out>
        </c:when>
        <c:when test="${param.score >= 0 && param.score < 60 }">
            <c:out value="不及格"></c:out>
        </c:when>
        <c:otherwise>
            <c:out value="您的输入有误"></c:out>
        </c:otherwise>
    </c:choose>
  </body>
</html>
